#include "top.h"
#include "ui_top.h"
#include "PixLabel.h"

#include <QUrl>
#include <QDesktopServices>

Top::Top(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Top)
{
    ui->setupUi(this);

    //connect(ui->label, &PixLabel::clicked, this, &PostCard::slot_pixLabel_Clicked);
    // 连接 QLabel 的 clicked 信号到自定义槽函数
        //connect(ui->label, &QLabel::clicked, this, &Top::onTextLabelClicked);
    //connect(ui->pushButton, &QPushButton::clicked, this, &Home::toList);

}

Top::~Top()
{
    delete ui;
}



void Top::onTextLabelClicked()
{
    QDesktopServices::openUrl(QUrl("https://www.example.com")); // 使用系统默认浏览器打开链接
}

